<?php

set_include_path(get_include_path() . PATH_SEPARATOR . $s_Lib_Path . 'phpexcel');

require_once 'PHPExcel.php';
require_once 'PHPExcel/RichText.php';
include 'PHPExcel/IOFactory.php';
include 'lib_file.php';

$a_headerstyle = array(
    'borders' => array(
        'allborders' => array(
        'style' => PHPExcel_Style_Border::BORDER_THIN,
        'color' => array('argb' => '00000000'),
        ),
    ),
    'font' => array(
        'bold'  => true,
        'color' => array('argb' => 'FFFFFFFF'),
        'size'  => '10'
    ),
    'alignment' => array(
        'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER,
    ),
    'fill' => array(
        'type'       => PHPExcel_Style_Fill::FILL_SOLID,
        'startcolor' => array('argb' => 'FF006699')
    )
);

$o_excel = new PHPExcel();

// <editor-fold defaultstate="collapsed" desc="Set properties">
$o_excel->getProperties()->setCreator($s_WebTitle);
$o_excel->getProperties()->setTitle($s_WebTitle);
$o_excel->getProperties()->setSubject($s_WebTitle);
$o_excel->getProperties()->setDescription($s_WebTitle);
// </editor-fold>

// <editor-fold defaultstate="collapsed" desc="Create a first sheet, representing sales data">
$o_excel->setActiveSheetIndex(0);
$o_excel->getActiveSheet()->getDefaultStyle()->getalignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);
$o_excel->getActiveSheet()->getDefaultStyle()->getalignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
// </editor-fold>

$o_writer   = PHPExcel_IOFactory::createWriter($o_excel, 'Excel5');
$v_thisdate = date('Y-m-d');
?>